package com.qf.controller;

import com.qf.model.Project;
import com.qf.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName ProjectController
 * @Description TODO
 * @Author 86181
 * @Date 2022/9/7 1:11
 * @Version 1.0
 **/
@RestController
@RequestMapping("project")
public class ProjectController {
    public ProjectController(){
        System.out.println("初始化了");
    }
    @Autowired
    private ProjectService projectService;
    @RequestMapping("findAll")
    public List<Project> findAll(){
        List<Project> all=projectService.findAllProject();
        for (Project project : all) {
            System.out.println(project);
        }
        return all;
    }

}
